//package cn.lizemin.fakedata.aop;
//
//import cn.lizemin.fakedata.utils.ServletUtil;
//import lombok.extern.slf4j.Slf4j;
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.Signature;
//import org.aspectj.lang.annotation.Around;
//import org.aspectj.lang.annotation.Aspect;
//import org.aspectj.lang.annotation.Pointcut;
//import org.aspectj.lang.reflect.MethodSignature;
//import org.springframework.stereotype.Component;
//
//import javax.servlet.http.HttpServletRequest;
//import java.util.Arrays;
//import java.util.Enumeration;
//
///**
// * @author 李泽民
// * @Date 2024/1/20 18:13
// * @Description
// */
//@Aspect
//@Slf4j
////@Component
//public class LogAspect {
//
//    @Pointcut("execution(public * cn.lizemin.fakedata.project.*.controller.*.*(..))")
//    public void reqLog() {
//
//    }
//
//    @Around(value = "reqLog()")
//    public Object around(ProceedingJoinPoint pjp) throws Throwable {
//        Object[] args = pjp.getArgs();
//        Signature sig = pjp.getSignature();
//        String methodName = sig.toString();
//        Object result = pjp.proceed();
//        HttpServletRequest request = ServletUtil.getRequest();
//        String refer = request.getHeader("origin");
//        log.info("方法{}的请求参数为：{}，返回的结果为：{}, 请求来源为：{}", methodName, Arrays.toString(args), result, refer);
//        return result;
//    }
//
//}
